package com.onluy.conf.rabbitmq;

import com.alibaba.fastjson.JSON;
import com.onluy.mqcomsumer.MessageType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

//@Component
public class RabbitmqReceive {

    protected Logger log =   LoggerFactory.getLogger(this.getClass());

//    @Autowired
//    private SysLogsService sysLogsService;
//
//    @RabbitListener(queues= "log" )    //监听器监听指定的Queue
//    public void processC(String str) {
//        SysLogs sysLogs= JSON.parseObject(str,SysLogs.class);
//        if(sysLogs!=null) sysLogsService.add(sysLogs);
//        log.info( "=========================RabbitmqReceive:"+str);
//    }
}
